#include "TaskAward.h"
#include "../maindef.h"

/*
bool CTaskCond::IsReachCond(CTaskCond& stCond, CTaskCond& stStat)
{   
    CT_TRACE(("检查目标是否满足条件:"));
    if (stCond._ucCond != stStat._ucCond)
    {
        CT_TRACE(("目标与条件类型不符!"));
        return false;
    }

    bool bIsReachCond = false;

    switch(stCond._ucCond)
    {
    case TASK_NONE:
        bIsReachCond = true;
        break;
    case TASK_LEVEL_UP:
        bIsReachCond =  stCond._iCondData1 <= stStat._iCondData1;
        break;
    case TASK_TASK_FINISH:
        bIsReachCond = (stCond._iCondData1 / 10 == stStat._iCondData1 / 10); //任务是以10步进的
        break;
    case TASK_BOSS_CONQUER:
    case TASK_ENEMY_KILL:
    case TASK_DO_SOME_OPT:
    case TASK_USE_ITEM:
    case TASK_GET_ITEM:
    case TASK_GET_AND_COMMIT_ITEM:    
    case TASK_FINISH_STAGE: 
        bIsReachCond = stCond._iCondData2 <= stStat._iCondData2;
        break;
    default:
        bIsReachCond =  false;
        break;
    }

    CT_TRACE(("条件：类型 %d , Data1 %d, Data2 %d", 
        stCond._ucCond, stCond._iCondData1, stCond._iCondData2));
    CT_TRACE(("当前状态：类型 %d , Data1 %d, Data2 %d", 
        stStat._ucCond, stStat._iCondData1, stStat._iCondData2));
    CT_TRACE(("是否满足条件：%d", bIsReachCond));

    return bIsReachCond;
}
*/
